import React, { createElement, FC } from 'react';
import { useFormContainerSelector } from '../../form-container';
import { Input } from 'antd';

export const FieldInputWeb: FC<any> = ({ value, onChange, columnConfig = {}, ...otherProps }) => {
  const { status, placeholder, defaultValue } = columnConfig;
  const [readonly] = useFormContainerSelector((s) => [s.readonly]);
  return (
    <Input
      disabled={readonly || status === '2'}
      defaultValue={defaultValue}
      placeholder={placeholder}
      value={value}
      onChange={onChange}
    />
  );
};
